-
Notifications
You must be signed in to change notification settings - Fork 21
fix: fix deprecator to exactly match python 3.13 API #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@sbillinge ready for review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 520 520
=========================================
Hits 520 520 🚀 New features to boost your workflow:
|
Directions for deprecating functionsThis is step-by-step directions for deprecating an old method or class using the We are doing this because lots of methods/functions using camel case (ie. Additionally, we are refactoring Here are instructions to do so!! Deprecating a function/methodFirst, you will have to locate method or function that needs to be deprecated. For this example, I will be using the 1) Write a private function for the deprecation messageTo make the deprecation methods consistent, its helpful to write a little function that prints the same message. We want the message to let the user know what is going to be broken in the future, what version it will be broken in, and what its new name will be. Because these changes are API-breaking, The removal will be made on a version bump of the first number (ie. going from version This is what that function will look like for our current example: Now i can reuse this throughout this file very easily! 2) import the deprecatorAs mentioned, I will be deprecating the 3) Change name of deprecated functionOnce imported, go to the method that needs to be deprecated, for me, this method looks like this currently, To deprecate it, I will change this functions name from 4) Use the
|
|
@sbillinge I wrote instructions (see above) on how to deprecate things. I tested this and it works too. I think we can begin deprecating and assigning people to deprecation tasks. We can link them to here or put this information in a different/better spot. |
|
Let's move this to mission-control. I will create a new repo there called This could be a good job for new students at UCSB. Get them learning forking workflow and group standards..... |
|
@sbillinge Perfect, thats exactly what I was thinking. Let me know when its live. |
|
https://github.com/bg-mission-control/operation-deprecate-everything is live (but empty) |
|
@sbillinge I dont think i have permission for this repo. Im getting a 404 error. |
The other deprecator didnt match the API for python 3.13. This fixes that. I tested this in python 3.12 and 3.13 envs and it worked as expected (using debugging print statements).